<template>
  <el-row :gutter="20">
    <el-col :span="12" v-for="(item, index) in systemList">
      <div class="system-item">
        <el-checkbox
          class="system-checkbox"
          :key="index"
          :label="item.id"
          :disabled="item.disable"
          border
        >
          <el-tooltip
            :content="item.app_name"
            effect="customized"
            placement="top"
          >
            <span class="tooltip">{{ item.app_name }}</span>
          </el-tooltip>
        </el-checkbox>
      </div>
    </el-col>
  </el-row>
</template>

<script setup>
import { computed } from 'vue';
const props = defineProps(['systemList']);
const systemList = computed({
  get: () => props.systemList
});
</script>
<style>
.el-popper.is-customized {
  /* Set padding to ensure the height is 32px */
  padding: 6px 12px;
  color: #fff;
  background: linear-gradient(90deg, #4ca6a6, #7fbfbf);
}

.el-popper.is-customized .el-popper__arrow::before {
  background: linear-gradient(45deg, #4ca6a6, #7fbfbf);
  color: #fff;
  right: 0;
}
</style>
<style lang="scss" scoped>
.system-item {
  width: 100%;
  display: inline-block;
  .system-checkbox {
    margin-bottom: 18px;
    width: 100%;
    :deep(.el-checkbox__label) {
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
</style>
